package com.gxa.learning.core.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * 题库实体类
 *
 * @Author ChenJ
 * @date 2021/12/02 14:16
 **/
@AllArgsConstructor
@NoArgsConstructor
@Data
@Table(name = "tb_questionBank")
@ApiModel
public class QuestionBank implements Serializable {

    /**
     * 题库编号
     */
    @Id
    @Column(name = "questionBank_id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @ApiModelProperty(name = "id", value = "id", dataType = "Long", example = "题库编号")
    private Long id;

    /**
     * 题库类型 输入
     */
    @Column(name = "questionBank_type", unique = true)
    @ApiModelProperty(name = "type", value = "type", dataType = "String", example = "题库类型 输入")
    private String type;

    /**
     * 题库名字 输入
     */
    @Column(name = "questionBank_name", unique = true)
    @ApiModelProperty(name = "name", value = "name", dataType = "String", example = "题库名字 输入")
    private String name;

    /**
     * 题库的上传者
     */
    @Column(name = "questionBank_admin", unique = true)
    @ApiModelProperty(name = "admin", value = "admin", dataType = "String", example = "题库的上传者")
    private String admin;

    /**
     * 题库状态 1.上架 2.下架
     */
    @Column(name = "questionBank_status", unique = true)
    @ApiModelProperty(name = "status", value = "status", dataType = "Integer", example = "题库状态 1.上架 2.下架")
    private Integer status;

    /**
     * 题库开始生效时间
     */
    @Column(name = "questionBank_time", unique = true)
    @ApiModelProperty(name = "time", value = "time", dataType = "Date", example = "题库开始生效时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date time;

    /**
     * 课程编号 关联课程
     */
    @Column(name = "course_id")
    @ApiModelProperty(name = "courseId", value = "courseId", dataType = "Long", example = "课程编号 关联课程")
    private Long courseId;

    /**
     * 题库的题目数量
     */
    @Column(name = "questionBank_question_count", unique = true)
    @ApiModelProperty(name = "queCount", value = "queCount", dataType = "Integer", example = "题库的题目数量")
    private Integer queCount;

}
